home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / programming / e / powerd0.06 / lib / startup_tri.ass < prev    next >
Text File  |  1999-11-30  |  930b  |  42 lines

  1. _START    move.l    $4.w,a6
  2.     lea    (DOSName,pc),a1
  3.     moveq    #37,d0
  4.     jsr    (-552,a6)        ; OpenLibrary()
  5.     move.l    d0,_DOSBase
  6.     beq.s    .FINISH
  7.     lea    (IntName,pc),a1
  8.     moveq    #37,d0
  9.     jsr    (-552,a6)        ; OpenLibrary()
  10.     move.l    d0,_IntuitionBase
  11.     beq.s    .CLOSEDOS
  12.     lea    (GfxName,pc),a1
  13.     moveq    #37,d0
  14.     jsr    (-552,a6)        ; OpenLibrary()
  15.     move.l    d0,_GfxBase
  16.     beq.s    .CLOSEINT
  17.  
  18.     xref    _main
  19.     bsr    _main        ; a6 is stored
  20.     move.l    d0,d2
  21.  
  22.     move.l    _GfxBase,a1
  23.     jsr    (-414,a6)        ; CloseLibrary()
  24. .CLOSEINT    move.l    _IntuitionBase,a1
  25.     jsr    (-414,a6)        ; CloseLibrary()
  26. .CLOSEDOS    move.l    _DOSBase,a1
  27.     jsr    (-414,a6)        ; CloseLibrary()
  28. .FINISH    move.l    d2,d0
  29.     rts
  30. ****************************************
  31.     xdef    _DOSBase
  32.     xdef    _IntuitionBase
  33.     xdef    _GfxBase
  34. ****************************************
  35. _DOSBase        dc.l    0
  36. _IntuitionBase    dc.l    0
  37. _GfxBase        dc.l    0
  38. ****************************************
  39. DOSName    dc.b    'dos.library',0
  40. IntName    dc.b    'intuition.library',0
  41. GfxName    dc.b    'graphics.library',0
  42.